<?php

declare(strict_types=1);

namespace DreamCat\StateMachine\Popo;

use DreamCat\StateMachine\Enums\TravelMark;

/**
 * 状态机数据
 * @author vijay
 * @template T
 */
class MachineData
{
    /** @var string 状态机唯一标识，比如病例编号或病例ID */
    private string $machineId;
    /** @var string 当前的状态 */
    private string $state;
    /** @var TravelMark 行进标志 */
    private TravelMark $travelMark;
    /** @var mixed 业务数据 */
    private mixed $busiData;

    /**
     * @return TravelMark 行进标志
     */
    public function getTravelMark(): TravelMark
    {
        return $this->travelMark;
    }

    /**
     * @param TravelMark $travelMark 行进标志
     */
    public function setTravelMark(TravelMark $travelMark): void
    {
        $this->travelMark = $travelMark;
    }

    /**
     * @return ?string 状态机唯一标识
     */
    public function getMachineId(): ?string
    {
        return $this->machineId;
    }

    /**
     * @param string $machineId 状态机唯一标识
     */
    public function setMachineId(string $machineId): void
    {
        $this->machineId = $machineId;
    }

    /**
     * @return string 当前的状态
     */
    public function getState(): string
    {
        return $this->state;
    }

    /**
     * @param string $state 当前的状态
     */
    public function setState(string $state): void
    {
        $this->state = $state;
    }

    /**
     * @return mixed 业务数据
     */
    public function getBusiData(): mixed
    {
        return $this->busiData;
    }

    /**
     * @param mixed $busiData 业务数据
     */
    public function setBusiData(mixed $busiData): void
    {
        $this->busiData = $busiData;
    }
}

# end of file
